package com.hc.bean;

public class Pager {
    private Integer page;   //当前页
    private Integer pageRows;   //每页显示行数
    private Integer rowCount;   //总行数
    private Integer pageCount;  //总页数

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getPageRows() {
        return pageRows;
    }

    public void setPageRows(Integer pageRows) {
        this.pageRows = pageRows;
    }

    public Integer getRowCount() {
        return rowCount;
    }

    public void setRowCount(Integer rowCount) {
        this.rowCount = rowCount;
    }

    public Integer getPageCount() {
        return (rowCount+pageRows-1)/pageRows;
    }

    public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }

    public Integer getFirstLimitParam(){
        return (page-1)*pageRows;
    }
}
